fname = input("输入文件名:") 

import os 

fname = os.path.join(os.path.dirname(__file__),fname)
print(fname) 

f = open(fname,encoding='utf-8') 

n_line=1
while True:
    line = f.readline()
    if line=='':
        break 
    n_line+=1
    print(line,end='')
    if n_line%25==0:
        s = input("输入任意键继续...输入q键退出....")
        if s=='q':
            break


